<template>
  <div>
    <transition name="slide-down">
      <div v-show="menuVisible" class="title-wrapper">
        <div class="left" @click="back">
          <span class="icon-back" />
        </div>
        <div class="right">
          <div class="icon-wrapper">
            <span class="icon-shelf" />
          </div>
          <div class="icon-wrapper">
            <span class="icon-cart" />
          </div>
          <div class="icon-wrapper">
            <span class="icon-more" />
          </div>
        </div>
      </div>
    </transition>
  </div>
</template>

<script>
import { ebookMixin } from '../../mixin/mixin'
export default {
  mixins: [ebookMixin],
  methods: {
    back() {
      console.log('返回')
    }
  }
}
</script>

<style lang="scss" scoped>
@import '../../style/index';
.title-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 101;
    display: flex;
    width: 100%;
    height: px2rem(48);
    background: white;
    box-shadow: 0 px2rem(8) px2rem(8) rgba(0, 0, 0, .15);
    font-size: px2rem(20);
    .left {
        flex: 0 0 px2rem(60);
        @include left;
        margin-left:  px2rem(15);
    }
    .right {
        flex: 1;
        display: flex;
        justify-content: flex-end;
        .icon-wrapper {
            flex: 0 0 px2rem(40);
            @include center;
            .icon-cart {
                font-size: px2rem(22);
            }
        }
    }
}
</style>
